<!-- 查询 -->
<template>
    <div class="search">
        <el-input v-model="keyword" placeholder="请输入要查询的账号/昵称"></el-input>
        <el-button type="primary" @click="search">查询</el-button>
        <el-button @click="reset">重置</el-button>
    </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';

let keyword = ref('')
let $emit = defineEmits(['getUserList'])
let props = defineProps(['paginationData'])
const search = () => {
    $emit('getUserList', props.paginationData.currentPage, props.paginationData.pageSize, keyword.value)
}
const reset = () => {
    keyword.value = ''
    $emit('getUserList', props.paginationData.currentPage, props.paginationData.pageSize, keyword.value)
}
</script>

<style lang="scss" scoped>
.search {
    margin: 10px 0 20px 0;
    display: flex;
    justify-content: center;

    .el-input {
        width: 25%;
        margin-right: 15px;
    }
}
</style>